package com.meilele.dao.czh;

import com.meilele.entity.czh.FiveDesignerIndex;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

@Repository
public interface FiveDesignerIndexMapper {
    @Delete({
        "delete from five_designer_index",
        "where designer_id = #{designerId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer designerId);

    @Insert({
        "insert into five_designer_index (designer_id, designer_produce, ",
        "designer_area)",
        "values (#{designerId,jdbcType=INTEGER}, #{designerProduce,jdbcType=VARCHAR}, ",
        "#{designerArea,jdbcType=VARCHAR})"
    })
    int insert(FiveDesignerIndex record);

    int insertSelective(FiveDesignerIndex record);

    @Select({
        "select",
        "designer_id, designer_produce, designer_area",
        "from five_designer_index",
        "where designer_id = #{designerId,jdbcType=INTEGER}"
    })
    @ResultMap("com.meilele.dao.czh.FiveDesignerIndexMapper.BaseResultMap")
    FiveDesignerIndex selectByPrimaryKey(Integer designerId);

    int updateByPrimaryKeySelective(FiveDesignerIndex record);

    @Update({
        "update five_designer_index",
        "set designer_produce = #{designerProduce,jdbcType=VARCHAR},",
          "designer_area = #{designerArea,jdbcType=VARCHAR}",
        "where designer_id = #{designerId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(FiveDesignerIndex record);
}